OPC > OPC Interface Service > OPCIS Groups

OPCIS Groups

Each group represents a connection to an OPC server. As such, more groups result in higher CPU utilization. All tags in an OPCIS belong to a group, which is represented by an OPC Group Facility. An OPC Group Facility can be used to monitor a variety of OPC server and OPC Group statistics. By default, all tags in an OPCIS belong to the group named OPCDEFAULTGROUP. This group is created automatically; on startup the OPCIS creates a facility named OPCDEFAULTGROUP and a set of status tags that represent information about the OPC connection.

Note: If the facility type for an OPCIS group is blank, the OPCIS will automatically update the facility type to OPC_FAC and updates from the OPC server will occur. If the facility type for an OPCIS group is set to any string other than "OPC_FAC", all point tags associated with that group will be disabled. This functionality is logged in the OPCIS log file under "MAX_TRACE" log settings.

For more information about status tags, see the following subsections:

OPC Group Definition Point

One of the tags in an OPC Group Facility is referred to as the OPC Group Definition tag; it has a UDC of SYOPCGDEF, which is a system UDC

Point configuration attributes for the OPC Group Definition tag define the information about the group, while the value of the tag defines the update rate of a group. The group point attributes described below will take precedence over OPC service configuration file keyword settings.

The point configuration attributes that have special meaning for an OPC Group Definition tag are General 1, Table Driven 1, Table Driven 2, Table Driven 3, and External ID. These attributes are configured on the Application and Point Reference pages of the point configuration record:

Attributes Description

General 1

Many OPC servers initialize tags to a sentinel value (for example, -9999.99) that does not represent a true tag value. Set the General 1 property to a numeric value that should be ignored. When a tag with this value is received from the OPC server, it is marked as unreliable but the OPC value is not stored (the previous value is retained).

Table Driven 1

The Table Driven 1 property is used to indicate what to do with the value of an OPC tag with OPC Quality flags that indicate an error. The default behavior is to mark as unreliable and save the value from the OPC server.

  • If set to OPCBADIGNR and an unreliable value is read, it will be discarded and the previous value is retained.
  • If set to OPCBADSTR and an unreliable value is read, it will be stored.

Table Driven 2

The Table Driven 2 property specifies whether the OPC server is to retrieve data from the cache or the device. This applies to all synchronous communication. This attribute provides the functionality of the OPC_SYNC_IO service configuration file keyword at the group level.

  • If set to OPCSYNCCCH, the OPCIS will sync IO via the cache.
  • If set to OPCSYNCDEV, the OPCIS will sync IO via the device.

Table Driven 3

The Table Driven 3 property defines the type of communications between the OPCIS and the OPC server. This attribute provides the functionality of the OPC_IO_TYPE service configuration file keyword at the group level.

  • If set to OPCIOASYNC the OPCIS will use asynchronous IO.
  • If set to OPCIOSYNC the OPCIS will use synchronous IO.

External ID

The External ID property can be used to specify the server and machine name for the OPC group when linking points to an external OPC server. The format is: server_name=<server>; machine_name=<machine>

The value of the OPC Group Definition tag indicates the OPC group update rate:

Note: Deleting an OPCIS group's SYOPCGDEF point causes that group to use the default group settings from the .cfg file.

Custom OPC Groups

Custom OPC groups can be created. Each has its own configuration and update rate.

Example

In the example below there are two groups: the default group and a group named OPC30SEC. The default group has an update rate of 60 seconds. This rate is based on the OPCIS configuration. The OPC30SEC group has an update rate of 30 seconds. This rate is based on the value of the OPC Group Definition tag (MYSITE.OPCIS::OPC30SEC.SYOPCGDEF).

Custom OPC Groups example

The update rate of a group can be changed in run-time by issuing a setpoint command to the Group Definition Tag. See OPCIS System UDCs for more information about creating these tags.

OPC Group Write Queue Size

Another tag in an OPC Group Facility is the OPC Group Write Queue Sz tag; it has UDC of SYOPCWQS, which is a system UDC

The value of the OPC Group Write Queue Sz point represents the current number of items in the OPC write queue, which queues requests to write values to the associated OPC server.

As with the OPC Group Definition point, the General 1 property on the Application page of the point configuration record carries special meaning for this tag and defines information about the group. The General 1 property is used to control the maximum write queue size of the OPC group to which the point is added.

The default value is 1000. Set the General 1 property to another numeric value to change the size of the queue. Every change to the point will be logged in the OPCIS.

OPC Group Status Tags

Upon startup, the OPCIS creates three Group Status tags to monitor group activity. The facility of the tag is in the format SITE_SERVICE (for example, MYSITE_OPCIS). The UDCs are described in the table below.

UDC UDC Name Description Point Type

SYOPCSGAC

OPC Groups Active

Number of groups active in the OPCIS.

Analog Input

SYOPCSGCT

OPC Group Count

Number of groups defined in the OPCIS.

Analog Input

SYOPCSGNC

OPC Groups Not Connected

Number of groups not connected in the OPCIS.

Analog Input

Back to top

Let us know how we can improve this topic.

CygNet at weatherford.com

© 2020 Weatherford. All rights reserved.